package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.UserEcologyPointsWalletLog;
import com.sc.nft.entity.vo.AdminEcologyPointsUserWalletPageDetailsVO;
import com.sc.nft.entity.vo.PointsWalletLogConsumePointsVO;
import com.sc.nft.entity.vo.ecology.AdminEcologyPointsUserPageDetailsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 用户生态积分钱包明细 Mapper 接口
 * </p>
 *
 * @author liGen
 * @since 2024-11-26
 */
@Mapper
public interface UserEcologyPointsWalletLogMapper extends BaseMapper<UserEcologyPointsWalletLog> {

    /**
     * 获取用户积分记录详情
     * @param page
     * @param type
     * @param startTime
     * @param endTime
     * @return
     */
    Page<AdminEcologyPointsUserWalletPageDetailsVO> getUserDetailsPage(Page page, @Param("userId") Long userId,@Param("walletId") Long walletId, @Param("type") Integer type, @Param("startTime") Date startTime, @Param("endTime")Date endTime);


    PointsWalletLogConsumePointsVO getConsumePoints(@Param("pointsId") Long pointsId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);


    BigDecimal getConditionWithPoints(@Param("pointsId") Long pointsId, @Param("isAdd") Boolean isAdd, @Param("type") int type, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
}
